POV-Ray : Newsgroups : povray.advanced-users : How to avoid or remove fog from the backgound? : How to avoid or remove fog from the backgound? Server Time
28 Jul 2024 12:30:53 EDT (-0400)
  How to avoid or remove fog from the backgound?  
From: Elmar Krieger
Date: 27 Jul 2005 02:35:01
Message: <web.42e72a35808d84e1e78d3d640@news.povray.org>
Hi!

Two things I'm chewing on:

1) Create fog that doesn't start immediately at the camera, but only at a
certain distance from it, so that some close objects are not fogged at all.
Comparable to the OpenGL GL_FOG_MODE GL_LINEAR feature that allows to
specify where the fog starts and where it reaches the maximum density.

What I am doing now is abusing ground fog, by rotating it such that the
'ground' is parallel to the viewplane (my camera is at <0,0,1024> and looks
at <0,0,-1>):

fog { distance 1500 fog_type 2 color rgbt<0,0,0,0.1> up <0,0,1> fog_offset
-5559 fog_alt 1341.000000 }

Is this the only way to emulate what I want, or am I missing something that
gets closer to OpenGL?

2) I'm trying hard to create a fogged object (that gets darker in the back)
in front of a transparent background (using +UA +FN command line options).
But I can't keep the fog from affecting the background color and alpha
value. The only hack I can currently think of is render the image twice,
once with and once without fog, and  use the alpha channel of the second
image to calculate how much fog I have to subtract from the first.

Is there any way to do it in one render pass? Can I somehow keep the fog
from modifying the background, or (also helpful) the alpha channel?

Many thanks for your help,
Elmar


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.